<template>
	<view class="record">
		<!-- 头部 -->
		<!-- 功能 -->
		<view class="nav">
			<view v-for="(item, index) in table" class="msg" @longtap="longtap(item)">
				<view class="msg-body">
					<view class="msg-ms">
						<image :src="item.userHead" mode="" style="width: 70rpx;height: 70rpx;"></image>
						<view style="padding-left: 15rpx;">
						<view class="title">{{item.nickName}}</view>
						<view class="tim">{{item.submitDatetime}}</view>
						</view>
					</view>
					<view class="text">{{item.comments}}</view>
				</view>
				<view class="msg-body" v-if="item.handleResult != null ">
					<view class="msg-ms">
						<image :src="item.handleHead" mode="" style="width: 70rpx;height: 70rpx;"></image>
						<view style="padding-left: 15rpx;">
						<view class="title">{{item.enterpriseName}}</view>
						<view class="tim">{{item.handleDatetime}}</view>
						</view>
					</view>
					<view class="text">{{item.handleResult}}</view>
				</view>
			</view>
		<!-- 	<view v-if="table.length==0" class="none">
				<view class="none-body">
					<cover-image class="none-image" src="../../../static/images/null.png"></cover-image>
					<view class="none-text">暂无数据</view>
				</view>
			</view> -->
		</view>
	</view>
</template>

<script>
	// import PublicHeader from '@/components/PublicHeader.vue';
	import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins.js';
	import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue';
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		mixins: [MescrollMixin],
		components: {
			// PublicHeader,
			MescrollBody
		},
		computed: mapState(['hasLogin', 'uerInfo']),
		data() {
			return {
				title: '我的消息',
				panduan: true, // 判断提现明细还是订单明细
				id: '',
				table: [],
				type: '',
				idd: ''
			}
		},
		watch: {
			panduan() {
				this.getData()
			}
		},
		mounted() {
			var _this = this
			console.log('uerInfo:', _this.uerInfo)
			_this.id = _this.uerInfo.userId
			if (_this.uerInfo.id) {
				_this.id = _this.uerInfo.id
			}
			_this.getData()
		},
		methods: {
			getData() {
				let _this = this
				if (this.panduan) {
					if (this.table.length == 0) {
						this.page = 1
					} else {
						return
					}
					_this.$http
						.get('/user/order/vieworderdetail/'+ _this.idd )
						.then(function(response) {
							if (response.success) {
								_this.table = response.data.orderIssueVoList
								
							}
						}).catch(function(error) {
							console.log(error);
						});
				}
			},
		},
		onLoad(option) {
			console.log(option)
			this.idd = option.orderId
		}
	}
</script>

<style scoped lang="scss">
	page {
		/* background-color: #F9FAFB; */
	}

	.msg {
		margin-bottom: 20rpx;
		border-radius: 10rpx;
		background-color: #FFFFFF;
		// border: 1rpx solid rgba(235, 236, 237, 1);
		overflow: hidden;
	}

	.card {
		width: 91.46%;
		/* min-height: 250rpx; */
		margin-left: 4.27%;
		margin-top: 20rpx;
		overflow: hidden;
		background: #EBF7FF;
		border-radius: 10px;
		border: 1px solid #BBE3FF;
	}

	.msg-body {
		width: 91.2%;
		margin-left: 4.4%;
	}
	.msg-ms{
		display: flex;align-items: center;
		padding: 25rpx 0 10rpx 0;
	}
	.title {
		// margin: 30rpx 0 10rpx 0;
		font-size: 30rpx;
		font-family: PingFangSC-Semibold, PingFang SC;
		font-weight: 600;
		color: rgba(51, 51, 51, 1);
	}
	.tim{
		font-size: 20rpx;
		margin-top: 5rpx;
	}
	.text {
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: rgba(102, 102, 102, 1);
		padding-bottom: 15rpx;
	}
	.navv {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 90rpx;
		padding: 30rpx 30rpx 0;
		// background-color: #ffffff;
		.navone {
			image {
				width: 30rpx;
				height: 30rpx;
				color: #000000;
			}
		}
		.navtwo {
			margin: 0 auto;
			text {
				font-size: 30rpx;
				color: #333333;
			}
		}
	}
</style>
